package everyday;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @Author: Siantar
 * @Date: 2023-06-04-21:00
 * @Description: 1.0
 */
public class T2465 {
    public int distinctAverages(int[] nums) {
        int n = nums.length;
        int[] sum = new int[n / 2];
        Arrays.sort(nums);
        for (int i = 0; i < n / 2; i++) {
            sum[i] = nums[i] + nums[n - i - 1];
        }
        return Arrays.stream(sum).boxed().collect(Collectors.toSet()).size();
    }
}
